* International Food Policy Research Institute, 2019, “Global Spatially-Disaggregated Crop Production Statistics Data for 2010 Version 2.0”, https://doi.org/10.7910/DVN/PRFF8V, Harvard Dataverse, V4

// Get the path of the currently running do-file
local do_file_path `c(pwd)'

// Change the working directory to the location of the do-file
cd "`do_file_path'"

clear
use "proc_data\GNUT2020-10-20.dta"
rename *, lower
label variable gnut "Groundnut prod (ha) - sum SPAM in cell : SPAM 2010v2"
label variable gnut050 "Groundnut prod (ha) - sum SPAM in cell of mean of all cell centres within 50km : SPAM 2010v2"
label variable gnut100 "Groundnut prod (ha) - sum SPAM in cell of mean of all cell centres within 100km : SPAM 2010v2"

save "proc_data\GNUT.dta", replace

* check national figures
collapse (sum) gnut, by(gid_0)